<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <title>Layui</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1">
    <link rel="stylesheet" href="layui/css/layui.css"  media="all">
    <script src="js/0_common/jquery.min.js"></script>
    <!-- 注意：如果你直接复制所有代码到本地，上述css路径需要改成你本地的 -->
</head>
<style>
    .fgsq .layui-form-select .layui-input {
        padding-right: 0 !important;
    }
    .ylbt {
        cursor: pointer;
    }
</style>

<body class="fgsq">
<fieldset class="layui-elem-field layui-field-title" style="margin-top: 20px;">
    <legend>企业复工复产申请-修改</legend>
</fieldset>

<form class="layui-form" action="" lay-filter="form-test" id="example" method="post">
    <div class="layui-form-item">
        <div class="" style="width: 774px;">
            <label class="layui-form-label">企业名称</label>
            <div class="layui-input-block">
                <input type="text" id="zd2" name="zd2" lay-verify="title" autocomplete="off" placeholder="请输入企业名称" class="layui-input">
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">统一社会信用代码</label>
            <div class="layui-input-block">
                <input type="text" name="zd1" lay-verify="content" autocomplete="off" placeholder="请输入企业统一社会信用代码" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">企业地址</label>
            <div class="layui-input-block">
                <input type="text" id="zd4" name="zd4" lay-verify="title" autocomplete="off" placeholder="请输入单位地址" class="layui-input">
            </div>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">所属区县</label>
            <div class="layui-input-block">
                <input type="text" id="zd3" name="zd3" lay-verify="title" autocomplete="off" placeholder="请输入所属区县" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">所属街道</label>
            <div class="layui-input-block">
                <input type="text" id="zd22" name="zd22" lay-verify="title" autocomplete="off" placeholder="请输入所属街道" class="layui-input">
            </div>
        </div>

    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">企业法人</label>
            <div class="layui-input-block">
                <input type="text" id="zd5" name="zd5" lay-verify="title" autocomplete="off" placeholder="请输入法人代表" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">法人联系方式</label>
            <div class="layui-input-block">
                <input type="text" id="zd6" name="zd6" lay-verify="phone" autocomplete="off" placeholder="请输入手机号" class="layui-input">
            </div>
        </div>
    </div>

    <!--    新增字段-->

    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">企业所有制</label>
            <div class="layui-input-block">
                <select name="zd50" lay-verify="required">
                    <option value=""></option>
                    <option value="0">国有企业</option>
                    <option value="1">民营企业</option>
                    <option value="2">外资及港澳台企业</option>
                </select>
            </div>
        </div>

        <div class="layui-inline">
            <label class="layui-form-label">所属行业</label>
            <div class="layui-input-block">
                <select name="zd51" lay-verify="required">
                    <option value=""></option>
                    <option value="0">农、林、牧、渔业</option>
                    <option value="1">采矿业</option>
                    <option value="2">制造业</option>
                    <option value="3">电力、热力、燃气及水生产和供应业</option>
                    <option value="4">建筑业</option>
                    <option value="5">批发和零售业</option>
                    <option value="6">交通运输、仓储和邮政业</option>
                    <option value="7">住宿和餐饮业</option>
                    <option value="8">信息传输、软件和信息技术服务业</option>
                    <option value="9">金融业</option>
                    <option value="10">房地产业</option>
                    <option value="11">租赁和商务服务业</option>
                    <option value="12">科学研究和技术服务业</option>
                    <option value="13">水利、环境和公共设施管理业</option>
                    <option value="14">居民服务、修理和其他服务业</option>
                    <option value="15">教育</option>
                    <option value="16">卫生和社会工作</option>
                    <option value="17">文化、体育和娱乐业</option>
                    <option value="18">公共管理、社会保障和社会组织</option>
                    <option value="19">国际组织</option>
                </select>
            </div>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">24小时值班人员</label>
            <div class="layui-input-block">
                <input type="text" id="zd52" name="zd52" lay-verify="title" autocomplete="off" placeholder="请输入24小时值班人员" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">值班人员联系方式</label>
            <div class="layui-input-block">
                <input type="text" id="zd53" name="zd53" lay-verify="phone" autocomplete="off" placeholder="请输入值班人员联系方式" class="layui-input">
            </div>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">是否个体工商户</label>
            <div class="layui-input-block">
                <div style="width: 182px;">
                    <input type="radio" name="zd54" value="是" title="是">
                    <input type="radio" name="zd54" value="否" title="否" checked>
                </div>
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">所属楼宇、产业园</label>
            <div class="layui-input-block">
                <input  type="text" id="zd56" name="zd56" autocomplete="off" placeholder="所属楼宇、产业园(非楼宇、产业园内企业不用选择)" class="layui-input"/>
                (非楼宇、产业园内企业不用选择)
            </div>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">员工总数</label>
            <div class="layui-input-block">
                <input type="text" id="zd58" name="zd58" lay-verify="title" autocomplete="off" placeholder="请输入员工总数" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">复工原因</label>
            <div class="layui-input-block">
                <select name="zd57" lay-verify="required">
                    <option value=""></option>
                    <option value="0">公共事业运行必需</option>
                    <option value="1">疫情防控必需</option>
                    <option value="2">群众生活必需</option>
                    <option value="3">重要国计民生</option>
                    <option value="4">春节期间未停产</option>
                    <option value="5">特殊原因申请提前复工</option>
                    <option value="6">2月9日后正常复工</option>
                </select>
            </div>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">外地返苏人数</label>
            <div class="layui-input-block">
                <input type="text" name="zd64" lay-verify="title" autocomplete="off" placeholder="请输入外地返苏人数" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">疫情防控重点地区员工数</label>
            <div class="layui-input-block">
                <input type="text" name="zd59" lay-verify="title" autocomplete="off" placeholder="请输入疫情防控重点地区员工数" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <span id="ggyqyg" style="display: inline-block">!</span>
        </div>
    </div>

    <div class="layui-form-item">
        <div id="ggyqwz" style="width: 604px;margin-left: 200px;display: none">
            <div class="layui-inline">
                <span  style="color: #6f6f6f">备注重点区域的清单（湖北全省各市、浙江省温州市、台州市、杭州市、宁波市、河南省信阳市、驻马店市、安徽省合肥市、阜阳市、江西省南昌市）</span>
            </div>
        </div>
        <!--<div style="width: 774px;">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <textarea name="zd60" placeholder="" class="layui-textarea"></textarea>
            </div>
        </div>-->
    </div>

    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">申请复工人数</label>
            <div class="layui-input-block">
                <input type="text" name="zd61" lay-verify="title" autocomplete="off" placeholder="请输入申请复工人数" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">疫情防控重点地区复工人数</label>
            <div class="layui-input-block">
                <input type="text" name="zd62" lay-verify="title" autocomplete="off" placeholder="请输入疫情防控重点地区复工人数" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <span id="ggyqfk" style="display: inline-block">!</span>
        </div>
    </div>

    <div class="layui-form-item">
        <div id="ggyqfkwz" style="width: 604px;margin-left: 200px;display: none">
            <div class="layui-inline">
                <span  style="color: #6f6f6f">备注重点区域的清单（湖北全省各市、浙江省温州市、台州市、杭州市、宁波市、河南省信阳市、驻马店市、安徽省合肥市、阜阳市、江西省南昌市）</span>
            </div>
        </div>
        <!--<div style="width: 774px;">
            <label class="layui-form-label">备注</label>
            <div class="layui-input-block">
                <textarea name="zd63" placeholder="" class="layui-textarea"></textarea>
            </div>
        </div>-->
    </div>

    <div class="layui-form-item">
        <label class="layui-form-label">疫情防控情况</label>
        <div style="width: 774px;">
            <input type="checkbox" name="zd65" title="疫情防控体系建设已到位">
            <input type="checkbox" name="zd66" title="职工统计分类管理已到位">
            <input type="checkbox" name="zd67" title="应急防控物资保障已到位">
            <input type="checkbox" name="zd68" title="疫情防控场所准备已到位">
        </div>
    </div>
    <!--    新增结束-->

    </div>
    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">复工日期</label>
            <div class="layui-input-block">
                <input type="text" name="zd11" id="date" lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">填报日期</label>
            <div class="layui-input-block">
                <input type="text" name="zd12" id="date1" lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">复工服务表</label>
        <div class="layui-input-block">
            <input type="text" name="zd13" id="input1" lay-verify="" autocomplete="off" placeholder="" class="layui-input" style="display: initial;width: 26.5%;" >
            <button type="button" class="layui-btn" id="test1"><i class="layui-icon"></i>上传文件</button>
            <span class="ylbt" onclick="window.location.href = file + '复工服务表.docx';"><img src="./img/ykya.png" width="28" height="28" alt="样例"/><span style="position: relative;top: 5px;">&nbsp;复工服务表样例</span></span>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">企业疫情防控预案</label>
        <div class="layui-input-block">
            <input type="text" name="zd14" id="input2" lay-verify="" autocomplete="off" placeholder="" class="layui-input" style="display: initial;width: 26.5%;" >
            <button type="button" class="layui-btn" id="test2"><i class="layui-icon"></i>上传文件</button>
            <span class="ylbt" onclick="window.location.href = file + '企业疫情防控预案样例.docx';"><img src="./img/ykya.png" width="28" height="28" alt="样例"/><span style="position: relative;top: 5px;">&nbsp;企业疫情防控预案样例</span></span>
        </div>
    </div>
   <!-- <div class="layui-form-item">
        <label class="layui-form-label">企业防护物资储备情况</label>
        <div class="layui-input-block">
            <input type="text" name="zd15" id="input3" lay-verify="title" autocomplete="off" placeholder="" class="layui-input" style="display: initial;width: 26.5%;" >
            <button type="button" class="layui-btn" id="test3"><i class="layui-icon"></i>上传文件</button>
            <span class="ylbt" onclick="window.location.href = file + '1581318856339.docx';"><img src="./img/ykya.png" width="28" height="28" alt="样例"/><span style="position: relative;top: 5px;">&nbsp;企业防护物资储备情况样例</span></span>
        </div>
    </div>-->
<!--    <div class="layui-form-item">-->
<!--        <label class="layui-form-label">承诺书</label>-->
<!--        <div class="layui-input-block">-->
<!--            <input type="text" name="zd16" id="input4" lay-verify="title" autocomplete="off" placeholder="" class="layui-input" style="display: initial;width: 26.5%;" >-->
<!--            <button type="button" class="layui-btn" id="test4"><i class="layui-icon"></i>上传文件</button>-->
<!--            <span class="ylbt" onclick="window.location.href = file + '承诺书样例.docx';"><img src="./img/ykya.png" width="28" height="28" alt="样例"/><span style="position: relative;top: 5px;">&nbsp;承诺书样例</span></span>-->
<!--        </div>-->
<!--    </div>-->

    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">物资报备日期</label>
            <div class="layui-input-block">
                <input type="text" name="zd25" id="date2" lay-verify="date" placeholder="yyyy-MM-dd" autocomplete="off" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">是否有应急药品</label>
            <div class="layui-input-block">
                <div style="width: 182px;">
                    <input type="radio" name="zd26" value="是" title="是">
                    <input type="radio" name="zd26" value="否" title="否" checked>
                </div>
            </div>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">口罩数量（个）</label>
            <div class="layui-input-block">
                <input type="text" id="zd27" name="zd27" lay-verify="title" autocomplete="off" placeholder="请输入口罩数量（个）" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">口罩可用天数（天）</label>
            <div class="layui-input-block">
                <input type="text" id="zd28" name="zd28" lay-verify="title" autocomplete="off" placeholder="请输入口罩可用天数（天）" class="layui-input">
            </div>
        </div>

    </div>

    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">75%酒精数量（ml）</label>
            <div class="layui-input-block">
                <input type="text" id="zd29" name="zd29" lay-verify="title" autocomplete="off" placeholder="请输75%酒精量（ml）" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">75%酒精可用天数（天）</label>
            <div class="layui-input-block">
                <input type="text" id="zd30" name="zd30" lay-verify="title" autocomplete="off" placeholder="请输入75%酒精可用天数（天）" class="layui-input">
            </div>
        </div>

    </div>

    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">橡胶手套（双）</label>
            <div class="layui-input-block">
                <input type="text" id="zd31" name="zd31" lay-verify="title" autocomplete="off" placeholder="请输入橡胶手套（双）" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">橡胶手套可用天数（天）</label>
            <div class="layui-input-block">
                <input type="text" id="zd32" name="zd32" lay-verify="title" autocomplete="off" placeholder="请输入橡胶手套可用天数（天）" class="layui-input">
            </div>
        </div>

    </div>

    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">肥皂数量（块）</label>
            <div class="layui-input-block">
                <input type="text" id="zd33" name="zd33" lay-verify="title" autocomplete="off" placeholder="请输入肥皂数量（块）" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">肥皂可用天数（天）</label>
            <div class="layui-input-block">
                <input type="text" id="zd34" name="zd34" lay-verify="title" autocomplete="off" placeholder="请输入肥皂可用天数（天）" class="layui-input">
            </div>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">测温仪器数量（个）</label>
            <div class="layui-input-block">
                <input type="text" id="zd35" name="zd35" lay-verify="title" autocomplete="off" placeholder="请输入测温仪器数量（个）" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">测温仪器可用天数（天）</label>
            <div class="layui-input-block">
                <input type="text" id="zd36" name="zd36" lay-verify="title" autocomplete="off" placeholder="请输入测温仪器可用天数（天）" class="layui-input">
            </div>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">84消毒液量（ml）</label>
            <div class="layui-input-block">
                <input type="text" id="zd37" name="zd37" lay-verify="title" autocomplete="off" placeholder="请输入84消毒液量（ml）" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">84消毒液可用天数（天）</label>
            <div class="layui-input-block">
                <input type="text" id="zd38" name="zd38" lay-verify="title" autocomplete="off" placeholder="请输入84消毒液可用天数（天）" class="layui-input">
            </div>
        </div>
    </div>

    <div class="layui-form-item">
        <div class="layui-inline">
            <label class="layui-form-label">消毒洗手液量（ml）</label>
            <div class="layui-input-block">
                <input type="text" id="zd39" name="zd39" lay-verify="title" autocomplete="off" placeholder="请输入消毒洗手液量（ml）" class="layui-input">
            </div>
        </div>
        <div class="layui-inline">
            <label class="layui-form-label">84消毒液可用天数（天）</label>
            <div class="layui-input-block">
                <input type="text" id="zd40" name="zd40" lay-verify="title" autocomplete="off" placeholder="请输入消毒洗手液可用天数（天）" class="layui-input">
            </div>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">企业防护物资储备情况</label>
        <div class="layui-input-block">
            <input type="text" name="zd24" id="input55" lay-verify="title" placeholder="允许上传大小为2M" autocomplete="off" placeholder="" class="layui-input" style="display: initial;width: 26.5%;" >
            <button type="button" class="layui-btn" id="test55"><i class="layui-icon"></i>上传文件</button>
            <span class="ylbt" onclick="window.location.href = file + '企业防护物资储备情况.docx';"> <img src="./img/ykya.png" width="28" height="28" alt="样例"/><span style="position: relative;top: 5px;">&nbsp;企业防护物资储备情况</span></span>
        </div>
    </div>
    <div class="layui-form-item">
        <label class="layui-form-label">贵单位在复工过程中是否存在难点或问题</label>
        <div class="layui-input-block">
            <input type="text" id="zd88" name="zd88" lay-verify="" autocomplete="off" placeholder="" class="layui-input" style="display: initial;width: 40%;height:200px;">
        </div>
    </div>

    <div class="layui-form-item" style="display: none">
        <label class="layui-form-label">单位出入口照片<span style="color: red">*</span>(必传)</label>
        <div class="layui-upload">
            <button type="button" class="layui-btn" id="test5">多图片上传</button>
            <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;width: 30%; margin-left: 10%">
                预览图：
                <div class="layui-upload-list" id="demo5"></div>
            </blockquote>
        </div>
    </div>
    <div class="layui-form-item" style="display: none">
        <label class="layui-form-label">办公区照片<span style="color: red">*</span>(必传)</label>
        <div class="layui-upload">
            <button type="button" class="layui-btn" id="test6">多图片上传</button>
            <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;width: 30%; margin-left: 10%">
                预览图：
                <div class="layui-upload-list" id="demo6"></div>
            </blockquote>
        </div>
    </div>
    <div class="layui-form-item" style="display: none">
        <label class="layui-form-label">食堂照片</label>
        <div class="layui-upload">
            <button type="button" class="layui-btn" id="test7">多图片上传</button>
            <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;width: 30%; margin-left: 10%">
                预览图：
                <div class="layui-upload-list" id="demo7"></div>
            </blockquote>
        </div>
    </div>
    <div class="layui-form-item" style="display: none">
        <label class="layui-form-label">应急物资照片<span style="color: red">*</span>(必传)</label>
        <div class="layui-upload">
            <button type="button" class="layui-btn" id="test8">多图片上传</button>
            <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;width: 30%; margin-left: 10%">
                预览图：
                <div class="layui-upload-list" id="demo8"></div>
            </blockquote>
        </div>
    </div>
    <div class="layui-form-item" style="display: none">
        <label class="layui-form-label">物资订单照片</label>
        <div class="layui-upload">
            <button type="button" class="layui-btn" id="test9">多图片上传</button>
            <blockquote class="layui-elem-quote layui-quote-nm" style="margin-top: 10px;width: 30%; margin-left: 10%">
                预览图：
                <div class="layui-upload-list" id="demo9"></div>
            </blockquote>
        </div>
    </div>
   <!-- <div class="layui-form-item">
        <div class="layui-input-block">
            <button class="layui-btn" lay-submit="" lay-filter="demo1">立即提交</button>
            <button type="reset" class="layui-btn layui-btn-primary">重置</button>
        </div>
    </div>-->
</form>



</ul>
<script src="layui/layui.js" charset="utf-8"></script>
<script src="js/constants.js"></script>
<script src="js/0_common/jquery.min.js"></script>
<script src="layui/jquery.serializejson.min.js"></script>
<!-- 注意：如果你直接复制所有代码到本地，上述js路径需要改成你本地的 -->
<script>
    var  id=getQueryString("id")
    var ctx = Constants.path;

    $("#ggyqyg").mouseover(function () {
        document.getElementById('ggyqwz').style.display=''
    }).mouseout(function () {
        document.getElementById('ggyqwz').style.display='none'
    });

    $("#ggyqfk").mouseover(function () {
        document.getElementById('ggyqfkwz').style.display=''
    }).mouseout(function () {
        document.getElementById('ggyqfkwz').style.display='none'
    });

    function getQueryString(name) {
        var reg = new RegExp("(^|&)" + name + "=([^&]*)(&|$)", "i");
        var r = window.location.search.substr(1).match(reg);
        if (r !== null)
            return unescape(r[2]);
        return null;
    }
    var file = ctx+"FUGONGP/"
    var d;

    function f(urls,id) {
        if (urls != null && urls != ""){
            var url = urls.split(",");
            $.each(url,function (i,u) {
                $('#'+id).append('<img src="'+ file + u +'" alt="'+ file + u +'" style = "width: 200px;" class="layui-upload-img">')
            })
        }
    }
    layui.use(['form', 'layedit', 'laydate','upload'], function(){
        var qyid = localStorage.getItem('qyid');
        var form = layui.form
            ,layer = layui.layer
            ,layedit = layui.layedit
            ,laydate = layui.laydate,
            upload = layui.upload
        $.ajax({
            type: "get",
            url: ctx + "pb/qysqbs/"+id,
            success: function(r) {
                d = r.data;
                if (r.code == "200"){
                    f(d.zd17,"demo5")
                    f(d.zd18,"demo6")
                    f(d.zd19,"demo7")
                    f(d.zd20,"demo8")
                    f(d.zd21,"demo9")
                    layui.form.val("form-test", d);
                }
            }
        })
        upload.render({
            elem: '#test1'
            ,url: ctx + 'file/fileUpload' //改成您自己的上传接口
            ,accept: 'file' //普通文件
            ,acceptMime: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/msword,application/vnd.ms-excel,application/pdf'
            ,ext: 'xls|xlsx|pdf|doc|docx'
            ,size:2048
            ,done: function(res){
                if (!res){
                    layer.msg('请勿上传空文件！');
                }else {
                    layer.msg('上传成功');
                    $("#input1").val(res.obj);
                }
            }
        });
        upload.render({
            elem: '#test2'
            ,url: ctx + 'file/fileUpload' //改成您自己的上传接口
            ,accept: 'file' //普通文件
            ,acceptMime: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/msword,application/vnd.ms-excel,application/pdf'
            ,ext: 'xls|xlsx|pdf|doc|docx'
            ,size:2048
            ,done: function(res){
                if (!res){
                    layer.msg('请勿上传空文件！');
                }else {
                    layer.msg('上传成功');
                    $("#input2").val(res.obj);
                }
            }
        });
        upload.render({
            elem: '#test3'
            ,url: ctx + 'file/fileUpload' //改成您自己的上传接口
            ,accept: 'file' //普通文件
            ,acceptMime: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/msword,application/vnd.ms-excel,application/pdf'
            ,ext: 'xls|xlsx|pdf|doc|docx'
            ,size:2048
            ,done: function(res){
                if (!res){
                    layer.msg('请勿上传空文件！');
                }else {
                    layer.msg('上传成功');
                    $("#input3").val(res.obj);
                }
            }
        });
        upload.render({
            elem: '#test4'
            ,url: ctx + 'file/fileUpload' //改成您自己的上传接口
            ,accept: 'file' //普通文件
            ,acceptMime: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/msword,application/vnd.ms-excel,application/pdf'
            ,ext: 'xls|xlsx|pdf|doc|docx'
            ,size:2048
            ,done: function(res){
                if (!res){
                    layer.msg('请勿上传空文件！');
                }else {
                    layer.msg('上传成功');
                    $("#input4").val(res.obj);
                }
            }
        });
        upload.render({
            elem: '#test55'
            ,url: ctx + 'file/fileUpload' //改成您自己的上传接口
            ,accept: 'file' //普通文件
            ,acceptMime: 'application/vnd.openxmlformats-officedocument.wordprocessingml.document,application/vnd.openxmlformats-officedocument.spreadsheetml.sheet,application/msword,application/vnd.ms-excel,application/pdf'
            ,ext: 'xls|xlsx|pdf|doc|docx'
            ,size:2048
            ,done: function(res){
                if (!res){
                    layer.msg('请勿上传空文件！');
                }else {
                    layer.msg('上传成功');
                    $("#input55").val(res.obj);
                }
            }
        });
        var test5 = "",test6 = "",test7 = "",test8 = "",test9 = "";
        upload.render({
            elem: '#test5'
            ,url: ctx + 'file/fileUpload' //改成您自己的上传接口
            ,acceptMime: 'image/*',
            ext: 'jpg|png|gif|bmp|jpeg'
            ,multiple: true
            ,before: function(obj){
                //预读本地文件示例，不支持ie8
                obj.preview(function(index, file, result){
                    $('#demo5').append('<img src="'+ result +'" alt="'+ file.name +'" style = "width: 200px;" class="layui-upload-img">')
                });
            }
            ,done: function(res){
                //上传完毕
                layer.msg('上传成功');
                if (test5 != ""){
                    test5 = test5 + "," + res.obj;
                }else {
                    test5 =  res.obj;
                }
            }
        });

        upload.render({
            elem: '#test6'
            ,url: ctx + 'file/fileUpload' //改成您自己的上传接口
            ,multiple: true
            ,acceptMime: 'image/*',
            ext: 'jpg|png|gif|bmp|jpeg'
            ,before: function(obj){
                //预读本地文件示例，不支持ie8
                obj.preview(function(index, file, result){
                    $('#demo6').append('<img src="'+ result +'" alt="'+ file.name +'" style = "width: 200px;" class="layui-upload-img">')
                });
            }
            ,done: function(res){
                layer.msg('上传成功');
                if (test6 != ""){
                    test6 = test6 + "," + res.obj;
                }else {
                    test6 =  res.obj;
                }
            }
        });
        upload.render({
            elem: '#test7'
            ,url: ctx + 'file/fileUpload' //改成您自己的上传接口
            ,multiple: true
            ,acceptMime: 'image/*',
            ext: 'jpg|png|gif|bmp|jpeg'
            ,before: function(obj){
                //预读本地文件示例，不支持ie8
                obj.preview(function(index, file, result){
                    $('#demo7').append('<img src="'+ result +'" alt="'+ file.name +'" style = "width: 200px;" class="layui-upload-img">')
                });
            }
            ,done: function(res){
                layer.msg('上传成功');
                if (test7 != ""){
                    test7 = test7 + "," + res.obj;
                }else {
                    test7 =  res.obj;
                }
            }
        });
        upload.render({
            elem: '#test8'
            ,url: ctx + 'file/fileUpload' //改成您自己的上传接口
            ,multiple: true
            ,acceptMime: 'image/*',
            ext: 'jpg|png|gif|bmp|jpeg'
            ,before: function(obj){
                //预读本地文件示例，不支持ie8
                obj.preview(function(index, file, result){
                    $('#demo8').append('<img src="'+ result +'" alt="'+ file.name +'" style = "width: 200px;" class="layui-upload-img">')
                });
            }
            ,done: function(res){
                layer.msg('上传成功');
                if (test8 != ""){
                    test8 = test8 + "," + res.obj;
                }else {
                    test8 =  res.obj;
                }
            }
        });
        upload.render({
            elem: '#test9'
            ,url: ctx + 'file/fileUpload' //改成您自己的上传接口
            ,multiple: true
            ,acceptMime: 'image/*',
            ext: 'jpg|png|gif|bmp|jpeg'
            ,before: function(obj){
                //预读本地文件示例，不支持ie8
                obj.preview(function(index, file, result){
                    $('#demo9').append('<img src="'+ result +'" alt="'+ file.name +'" style = "width: 200px;" class="layui-upload-img">')
                });
            }
            ,done: function(res){
                layer.msg('上传成功');
                if (test9 != ""){
                    test9 = test9 + "," + res.obj;
                }else {
                    test9 =  res.obj;
                }
            }
        });
        //日期
        laydate.render({
            elem: '#date'
        });
        laydate.render({
            elem: '#date1',
            value: new Date()
        });
        laydate.render({
            elem: '#date2',
            value: new Date()
        });

        //自定义验证规则
        form.verify({
            title: function(value){
                if(value.length < 1){
                    return '请填写内容！';
                }
            }
            ,pass: [
                /^[\S]{6,12}$/
                ,'密码必须6到12位，且不能出现空格'
            ]
            ,content: function(value){
                if(value.length < 18){
                    return '信用代码填写不正确！';
                }
            }
        });

        //监听提交
        form.on('submit(demo1)', function(data){
            var obj1 = $("#example").serializeJSON()
            var obj = {};
            obj.zd1 = obj1.zd1
            obj.zd2 = obj1.zd2
            obj.zd3 = obj1.zd3
            obj.zd4 = obj1.zd4
            obj.zd5 = obj1.zd5
            obj.zd6 = obj1.zd6
            obj.zd7 = obj1.zd7
            obj.zd8 = obj1.zd8
            obj.zd9 = obj1.zd9
            obj.zd10 = obj1.zd10
            obj.zd11 = obj1.zd11
            obj.zd12 = obj1.zd12
            obj.zd13 = obj1.zd13
            obj.zd14 = obj1.zd14
            obj.zd15 = obj1.zd15
            // obj.zd16 = obj1.zd16
            obj.zd17 = test5;
            obj.zd18 = test6;
            obj.zd19 = test7;
            obj.zd20 = test8;
            obj.zd21 = test9;
            obj.qyid = qyid;
            obj.zd22 = obj1.zd22;
            obj.zd24 = obj1.zd24;
            obj.zd25 = obj1.zd25;
            obj.zd26 = obj1.zd26;
            obj.zd27 = obj1.zd27;
            obj.zd28 = obj1.zd28;
            obj.zd29 = obj1.zd29;
            obj.zd30 = obj1.zd30;
            obj.zd31 = obj1.zd31;
            obj.zd32 = obj1.zd32;
            obj.zd33 = obj1.zd33;
            obj.zd34 = obj1.zd34;
            obj.zd35 = obj1.zd35;
            obj.zd36 = obj1.zd36;
            obj.zd37 = obj1.zd37;
            obj.zd38= obj1.zd38;
            obj.zd39 = obj1.zd39;
            obj.zd40 = obj1.zd40;
            obj.zd88 = obj1.zd88;
            if (obj.zd17 == ""){
                obj.zd17= d.zd17
            }
            if (obj.zd18 == ""){
                obj.zd18= d.zd18
            }
            if (obj.zd19 == ""){
                obj.zd19= d.zd19
            }if (obj.zd20 == ""){
                obj.zd20= d.zd20
            }
            if (obj.zd21 == ""){
                obj.zd21= d.zd21
            }



            for (let i = 50; i <= 70; i++) {
                obj['zd' + i] = obj1['zd' + i];
            }
            $.ajax({
                type: "post",
                url: ctx + "pv/qysqbs",
                data: JSON.stringify(obj),
                dataType:"json",
                contentType:"application/json",
                success: function(r) {
                    $.ajax({
                        type: "put",
                        url: ctx + "pv/qyxxs/"+qyid,
                        data: JSON.stringify({
                            "status":"1"
                        }),
                        dataType:"json",
                        contentType:"application/json",
                        success: function(r) {
                            if (r.code == "200"){
                                layer.msg('上报成功！', {
                                    icon: 1,
                                    time: 2000 //2秒关闭（如果不配置，默认是3秒）
                                }, function(){
                                    parent.window.location.href = "test.html"
                                });
                            }else {
                                layer.msg('提交失败');
                            }
                        }
                    });
                }
            });
            return false;
        })

    });

</script>

</body>
</html>